<?php
/**
 * (C)2012-2014 twcms.com TongWang Inc.
 * Author: wuzhaohuan <kongphp@gmail.com>
 */

const DEBUG = 2;    //调试模式，分三种：0 关闭调试; 1 开启调试; 2 开发调试   注意：开启调试会暴露绝对路径和表前缀
const APP_NAME = 'twcms';    //APP名称
const F_APP_NAME = 'twcms';    //前台APP名称

define('ADM_PATH', dirname($_SERVER['SCRIPT_FILENAME']).'/');	//后台目录
define('TWCMS_PATH', dirname(ADM_PATH).'/');	//TWCMS目录
defined('CONFIG_PATH') || define('CONFIG_PATH', TWCMS_PATH.'config/');	//配置目录
const APP_PATH = TWCMS_PATH . F_APP_NAME . '/';    //APP目录
if(!is_file(CONFIG_PATH.'config.inc.php')) {
    exit('<html lang="zh"><body><script>window.location.href="/install/"</script></body></html>');
}

include CONFIG_PATH.'config.inc.php';

const RUNTIME_MODEL = APP_PATH . 'runtime/' . F_APP_NAME . '_model/';    //模型缓存目录
const CONTROL_PATH = ADM_PATH . 'control/';    //控制器目录
const VIEW_PATH = ADM_PATH . 'view/';    //视图目录
const KONG_PATH = APP_PATH . 'kongphp/';    //框架目录
require KONG_PATH.'kongphp.php';
//echo "\r\n<!--".number_format(microtime(1) - $_ENV['_start_time'], 4).'-->';
